﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ATMsystem
{
    internal class Bank
    {
        private string name;
        static List<Account> accountsList = new List<Account>();
        public Account this[int i] { get { return accountsList[i]; } }
        public void register(Account account)
        {
            accountsList.Add(account);
        } 
        public bool logIn(int acID,int psw)
        {
            foreach(Account ac in accountsList)
            {
                if (ac.Id == acID && ac.Pswd == psw)
                    return true;

            }
            return false;
                
                  
                    
        }
        public Bank(string name)
        {
            this.name = name;
        }
       


    }
}
